<?php

/**
 * Descuentos form.
 *
 * @package    tercermilenio
 * @subpackage form
 * @author     Your name here
 */
class DescuentosForm extends BaseDescuentosForm {

    public function configure() {

    }

    public function setup() {
        parent::setup();

        $this->setWidgets(array(
            'dsc_porcentaje' => new sfWidgetFormInput(),
            'id' => new sfWidgetFormInputHidden(),
        ));

        $this->setValidators(array(
            'dsc_porcentaje' => new sfValidatorNumber(array('min' => 0, 'max' => 100, 'required' => true)),
            'id' => new sfValidatorPropelChoice(array('model' => 'Descuentos', 'column' => 'id', 'required' => false)),
        ));

        $this->widgetSchema->setNameFormat('descuentos[%s]');

        $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
    }

}
